import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      component: resolve => require(['@/components/common/Home.vue'], resolve),
      children: [{
          path: '/index',
          component: resolve => require(['@/page/index.vue'], resolve) // 首页
        },
        {
          path: '/Welfare',
          component: resolve => require(['@/page/creditCardInformation/welfare.vue'], resolve) // 信用卡资讯 => 信用卡福利
        },
        {
          path: '/RaiseAmount',
          component: resolve => require(['@/page/creditCardInformation/raiseAmount.vue'], resolve) // 信用卡资讯 => 信用卡提额
        },
        {
          path: '/SearchPage',
          component: resolve => require(['@/page/commonTools/searchPage.vue'], resolve) // 常用工具
        },
        {
          path: '/creditCenterPage',
          component: resolve => require(['@/page/creditCenter/creditCenterPage.vue'], resolve) // 贷款中心
        },
        {
          path: '/applyCreditCardPage',
          component: resolve => require(['@/page/applyCreditCard/applyCreditCardPage.vue'], resolve) // 申请信用卡
        }
      ]
    }
  ]
})
